import {getItem} from "../services/LocalDataService";
import {getUserInfo} from "../services/SecurityService";

export * from './TypeUtil';
export * from './AppUtil';
export * from './URLUtil';
export * from './TreeUtil';
export * from './ObjUtil';
export * from './UpdateUtil';
export * from './ImportUtil';
export * from './StringUtil';
export * from './ValidUtil';
export * from './FormatUtil';
export * from './ParamsUtil';
export * from './IconUtil';

// @ts-ignore
const getBreadcrumb: Function = () => {
    let key: string = location.pathname.split("/")[2];
    let tab: any[] = getItem("tabList")[getUserInfo().id];
    let {breadcrumb = []}: { breadcrumb: any[] } = tab.find((i: any) => (i.key === key));
    return breadcrumb;
}

export {
    getBreadcrumb
}